<div class="formbody">
    <div class="formtitle">
        <span>基本信息</span>
    </div>
    <form action="" method="post" accept-charset="utf-8">
        <ul class="forminfo">
            <li>
                <label>用户名</label>
                <input type="text" class="dfinput" name="username" value="<?php echo empty($admin['username']) ? '':$admin['username']; ?>" placeholder="" />
            </li>
            <li>
                <label>密码</label>
                <?php if ( isset($admin) && empty($admin['password']) ): ?>
                    <input type="text" class="dfinput" readonly placeholder="不允许修改密码"/>
                <?php else: ?>
                    <input type="text" class="dfinput" name="password" value="" />
                <?php endif; ?>
            </li>
            <li>
                <label>角色</label>
                <ul class="formItemList">
                    <?php foreach ($roleList as $k => $v): ?>
                        <li>
                            <input type="checkbox" name="roleIdList[]" value="<?php echo $v['id']; ?>" <?php echo ( !empty($admin['roleIdList']) && in_array($v['id'],$admin['roleIdList']) ) ? 'checked' : ''; ?>/>
                            <?php echo $v['name']; ?>
                        </li>
                    <?php endforeach; ?>
                </ul>
            </li>
             <li>
                <label>可管理学校</label>
                <ul class="formItemList"> 
                    <?php foreach ($schoolList as $k => $v): ?>
                     <li>
                            <input type="checkbox" name="school_id[]" value="<?php echo $v['id']; ?>" <?php echo ( !empty($admin['school_id']) && in_array($v['id'],$admin['school_id']) ) ? 'checked' : ''; ?>/>
                            <?php echo $v['name']; ?>
                        </li>  
                    <?php endforeach; ?> 
                       </select>
                </ul>
            </li>
            <li>
                <label>&nbsp;</label>
                <input name="" type="submit" class="btn" value="确认保存"/>
            </li>
        </ul>
    </form>
</div>
<div>
    <?php if (!empty($admin['menuList']) && is_array($admin['menuList'])): ?>
       <?php pr( pr($admin['menuList'])); ?>
    <?php endif; ?>
</div>
